package cn.hdu.liang.socket;

import java.time.LocalDate;
import java.time.LocalTime;

public class TalkClient {
    public static void main(String args[]) {

        System.out.println(time());
        String s = "16:55:41.456";
        System.out.println(s.substring(0, s.indexOf('.')));
    }

    public static String time() {
        return LocalDate.now().toString() + " " +
                LocalTime.now().toString().replaceAll("\\.\\d+", "");
    }
}